<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/bootstrap.css">
    <link rel="shortcut icon" href="../fonts/bootstrap.icon">
    <script src="../js/jq-1.12.4.js"></script>
    <script src="../js/bootstrap.js"></script>
    <style>
        .foot {
            width: 100%;
            height: 100px;
            position: fixed;
            bottom: 0;
            border-top: 1px solid #ddd;
            background-color: #fff;
        }

        .item {
            /* border: 1px solid blue; */
            position: relative;
            height: 100px;
            cursor: pointer;
        }

        .item:hover {
            background-color: #eee;
        }

        .item>div {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .active {
            color: red;
        }
    </style>

</head>

<body>
    <div id="app">
        <div class="foot container">
            <div class='row'>
                <div class="item active col-sm-3 col-xs-3 text-center">
                    <div>
                        <p class="glyphicon glyphicon-home"></p>
                        <div>首页</div>
                    </div>
                </div>
                <div class="item col-sm-3 col-xs-3 text-center">
                    <div>
                        <p class="glyphicon glyphicon-search"></p>
                        <div>搜索</div>
                    </div>
                </div>
                <div class="item col-sm-3 col-xs-3 text-center">
                    <div>
                        <p class="glyphicon glyphicon-fire"></p>
                        <div>热点</div>
                    </div>
                </div>
                <div class="item col-sm-3 col-xs-3 text-center">
                    <div>
                        <p class="glyphicon glyphicon-user"></p>
                        <div>我的</div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</body>
<script>
    $(function () {
        $(".item").click(function () {
            $(this).siblings().removeClass('active').end().addClass("active")
        })
    })

</script>

</html>